package com.pllandxzx.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.pll.dto.ResponseDto;
import com.pll.pojo.Order;
import com.pll.pojo.Ruler;
import com.pllandxzx.bean.GetAllOrderListBean;
import com.pllandxzx.mapper.OrderMapper;
import com.pllandxzx.service.OrderService;
import com.pllandxzx.vo.OrderVo;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;

/**
 * @ClassName OrderControllerImpl
 * @Description TODO
 * @Author 小鹿
 * @Date 2025/6/12 15:18
 */
@Service
public class OrderServiceImpl implements OrderService
{
    @Autowired
    private OrderMapper orderMapper;
    @Override
    public ResponseDto getAllOrderList(OrderVo orderVo)
    {
        Page<Order> orderPage = new Page<>(orderVo.getPage(), orderVo.getPageSize());
        IPage<GetAllOrderListBean> res = orderMapper.getAllOrderList(orderVo,orderPage);
        System.out.println("数据："+res.getRecords());
        System.out.println("总条数:"+res.getTotal());
        return ResponseDto.success(res);
    }
}